import random

num = random.randint(1, 10)
while True:
    answer = int(input('猜一个10以内的数：'))
    if num > answer:
        print('猜小了')
    elif num < answer:
        print('猜大了')
    else:
        print('猜对了')
        break